package com.yl.request.common.glaencrypt.enums;

public enum CryptLevel {
    PUBLIC("公开", "0"),
    DEFAULT("内部", "1"),
    PROTECTED("秘密", "2"),
    PRIVATE("机密", "3");

    private final String name;
    private final String level;

    CryptLevel(String name, String level) {
        this.name = name;
        this.level = level;
    }

    public String Name() {
        return this.name;
    }

    public String Level() {
        return this.level;
    }

    public static CryptLevel from(String level) {
        CryptLevel cryptLevel = null;
        CryptLevel[] var2 = values();
        int var3 = var2.length;

        for(int var4 = 0; var4 < var3; ++var4) {
            CryptLevel e = var2[var4];
            if (e.Level().equals(level)) {
                cryptLevel = e;
            }
        }

        if (cryptLevel == null) {
            throw new IllegalArgumentException("not support crypt level " + level);
        } else {
            return cryptLevel;
        }
    }
}